home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / g_man / cat3 / OpenGL / glblendequation.z / glblendequation
Encoding:
Text File  |  2001-04-17  |  11.1 KB  |  214 lines

  1.  
  2.  
  3.  
  4. ggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnn((((3333GGGG))))            OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee            ggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnn((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnn - set the blend equation
  10.  
  11.  
  12. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      void ggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnn( GLenum _m_o_d_e )
  14.  
  15.  
  16. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  17.      _m_o_d_e  specifies how source and destination colors are combined.  It must
  18.            be GGGGLLLL____FFFFUUUUNNNNCCCC____AAAADDDDDDDD, GGGGLLLL____FFFFUUUUNNNNCCCC____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT, GGGGLLLL____FFFFUUUUNNNNCCCC____RRRREEEEVVVVEEEERRRRSSSSEEEE____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT, GGGGLLLL____MMMMIIIINNNN,
  19.            GGGGLLLL____MMMMAAAAXXXX, GGGGLLLL____AAAALLLLPPPPHHHHAAAA____MMMMIIIINNNN____SSSSGGGGIIIIXXXX, or GGGGLLLL____AAAALLLLPPPPHHHHAAAA____MMMMAAAAXXXX____SSSSGGGGIIIIXXXX.
  20.  
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      The blend equation determines how a new pixel (the ``source'' color) is
  24.      combined with a pixel already in the framebuffer (the ``destination''
  25.      color).
  26.  
  27.      GGGGLLLL____MMMMIIIINNNN
  28.           sets the blend equation so that each component of the result color
  29.           is the minimum of the corresponding components of the source and
  30.           destination colors.
  31.  
  32.      GGGGLLLL____MMMMAAAAXXXX
  33.           sets the blend equation so that each component of the result color
  34.           is the maximum of the corresponding components of the source and
  35.           destination colors.
  36.  
  37.      GGGGLLLL____AAAALLLLPPPPHHHHAAAA____MMMMIIIINNNN____SSSSGGGGIIIIXXXX
  38.           sets the blend equation so that the result color is either the
  39.           source or destination color, according to whether the alpha
  40.           component of the source color is less than, or greater than or equal
  41.           to, the alpha component of the destination color, respectively.
  42.  
  43.      GGGGLLLL____AAAALLLLPPPPHHHHAAAA____MMMMAAAAXXXX____SSSSGGGGIIIIXXXX
  44.           sets the blend equation so that the result color is either the
  45.           source or destination color, according to whether the alpha
  46.           component of the source color is greater than, or less than or equal
  47.           to, the alpha component of the destination color, respectively.
  48.  
  49.      The remaining blend equations use the source and destination blend
  50.      factors specified by ggggllllBBBBlllleeeennnnddddFFFFuuuunnnncccc.  See ggggllllBBBBlllleeeennnnddddFFFFuuuunnnncccc for a description of
  51.      the various blend factors.
  52.  
  53.      In the equations that follow, source and destination color components are
  54.      referred to as (R  G  B  A ) and (R  G  B  A ), respectively.  The result
  55.                       s, s, s, s        d, d, d, d
  56.      color is referred to as (R  G  B  A ).  The source and destination blend
  57.                                r, r, r, r
  58.      factors are denoted (s  s  s  s ) and (d  d  d  d ), respectively.  For
  59.                            R, G, B, A        R, G, B, A
  60.      these equations all color components are understood to have values in the
  61.      range [0, 1].
  62.  
  63.  
  64.  
  65.  
  66.                                                                         PPPPaaaaggggeeee 1111
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. ggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnn((((3333GGGG))))            OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee            ggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnn((((3333GGGG))))
  74.  
  75.  
  76.  
  77.      GGGGLLLL____FFFFUUUUNNNNCCCC____AAAADDDDDDDD
  78.           sets the blend equation so that the source and destination data are
  79.           added.  Each component of the source color is multiplied by the
  80.           corresponding source factor, then each component of the destination
  81.           color is multiplied by the corresponding destination factor.  The
  82.           result is the componentwise sum of the two products, clamped to the
  83.           range [0, 1].
  84.  
  85.                Rr = min(1, R  s  + R  d )
  86.                             s  R    d  R
  87.                Gr = min(1, G  s  + G  d )
  88.                             s  G    d  G
  89.                Br = min(1, B  s  + B  d )
  90.                             s  B    d  B
  91.                Ar = min(1, A  s  + A  d )
  92.                             s  A    d  A
  93.  
  94.      GGGGLLLL____FFFFUUUUNNNNCCCC____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT
  95.           Is like GGGGLLLL____FFFFUUUUNNNNCCCC____AAAADDDDDDDD except the product of the destination factor and
  96.           the destination color is componentwise subtracted from the product
  97.           of the source factor and the source color.  The result is clamped to
  98.           the range [0, 1].
  99.  
  100.                Rr = max(0, R  s  - R  d )
  101.                             s  R    d  R
  102.                Gr = max(0, G  s  - G  d )
  103.                             s  G    d  G
  104.                Br = max(0, B  s  - B  d )
  105.                             s  B    d  B
  106.                Ar = max(0, A  s  - A  d )
  107.                             s  A    d  A
  108.  
  109.      GGGGLLLL____FFFFUUUUNNNNCCCC____RRRREEEEVVVVEEEERRRRSSSSEEEE____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT
  110.           Is like GGGGLLLL____FFFFUUUUNNNNCCCC____AAAADDDDDDDD except the product of the source factor and the
  111.           source color is componentwise subtracted from the product of the
  112.           destination factor and the destination color.  The result is clamped
  113.           to the range [0, 1].
  114.  
  115.                Rr = max(0, R  d  - R  s )
  116.                             d  R    s  R
  117.                Gr = max(0, G  d  - G  s )
  118.                             d  G    s  G
  119.                Br = max(0, B  d  - B  s )
  120.                             d  B    s  B
  121.                Ar = max(0, A  d  - A  s )
  122.                             d  A    s  A
  123.  
  124.      The GGGGLLLL____MMMMIIIINNNN and GGGGLLLL____MMMMAAAAXXXX equations are useful for applications that analyze
  125.      image data (image thresholding against a constant color, for example).
  126.      The GGGGLLLL____FFFFUUUUNNNNCCCC____AAAADDDDDDDD equation is useful for antialiasing and transparency,
  127.      among other things.
  128.  
  129.      Initially, the blend equation is set to GGGGLLLL____FFFFUUUUNNNNCCCC____AAAADDDDDDDD.
  130.  
  131. NNNNOOOOTTTTEEEESSSS
  132.      ggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnn is part of the GGGGLLLL____AAAARRRRBBBB____iiiimmmmaaaaggggiiiinnnngggg subset. ggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnn is
  133.      present only if GGGGLLLL____AAAARRRRBBBB____iiiimmmmaaaaggggiiiinnnngggg is returned when ggggllllGGGGeeeettttSSSSttttrrrriiiinnnngggg is called
  134.      with GGGGLLLL____EEEEXXXXTTTTEEEENNNNSSSSIIIIOOOONNNNSSSS as its argument.
  135.  
  136.      The GGGGLLLL____MMMMIIIINNNN, GGGGLLLL____MMMMAAAAXXXX, GGGGLLLL____AAAALLLLPPPPHHHHAAAA____MMMMIIIINNNN____SSSSGGGGIIIIXXXX and GGGGLLLL____AAAALLLLPPPPHHHHAAAA____MMMMAAAAXXXX____SSSSGGGGIIIIXXXX equations do
  137.      not use the source or destination factors, only the source and
  138.      destination colors.
  139.  
  140.  
  141.  
  142.  
  143.  
  144.                                                                         PPPPaaaaggggeeee 2222
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151. ggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnn((((3333GGGG))))            OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee            ggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnn((((3333GGGG))))
  152.  
  153.  
  154.  
  155. EEEERRRRRRRROOOORRRRSSSS
  156.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _m_o_d_e is not one of GGGGLLLL____FFFFUUUUNNNNCCCC____AAAADDDDDDDD,
  157.      GGGGLLLL____FFFFUUUUNNNNCCCC____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT, GGGGLLLL____FFFFUUUUNNNNCCCC____RRRREEEEVVVVEEEERRRRSSSSEEEE____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT, GGGGLLLL____MMMMAAAAXXXX, or GGGGLLLL____MMMMIIIINNNN.
  158.  
  159.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnn is executed between
  160.      the execution of ggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ggggllllEEEEnnnndddd.
  161.  
  162. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  163.      ggggllllGGGGeeeetttt with an argument of GGGGLLLL____BBBBLLLLEEEENNNNDDDD____EEEEQQQQUUUUAAAATTTTIIIIOOOONNNN
  164.  
  165.  
  166. MMMMAAAACCCCHHHHIIIINNNNEEEE DDDDEEEEPPPPEEEENNNNDDDDEEEENNNNCCCCIIIIEEEESSSS
  167.      The SGIX_blend_alpha_minmax extension is supported only on OOOOccccttttaaaannnneeee2222 VVVVPPPPrrrroooo
  168.      systems.
  169.  
  170.  
  171. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  172.      ggggllllGGGGeeeettttSSSSttttrrrriiiinnnngggg, ggggllllBBBBlllleeeennnnddddCCCCoooolllloooorrrr, ggggllllBBBBlllleeeennnnddddFFFFuuuunnnncccc
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.                                                                         PPPPaaaaggggeeee 3333
  211.  
  212.  
  213.  
  214.